package com.example.heathy_me;

import android.app.Application;
import android.content.Context;

import com.example.heathy_me.utils.User;

public class MyApplication extends Application {
    private static Context context;
    private boolean login = false;
    private User user;
    private String Url ="http://122.152.221.118:5000/";
    @Override
    public void onCreate() {
        super.onCreate();
        //获取Context
        context = getApplicationContext();
    }

    //返回
    public static Context getContextObject(){
        return context;
    }


    public boolean isLogin() {
        return login;
    }

    public void setLogin(boolean login) {
        this.login = login;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
        if(user!=null)
        {
            this.login=true;
        }
    }

    public String getUrl() {
        return Url;
    }

    public void setUrl(String url) {
        Url = url;
    }
}
